incorrectInput = True
while incorrectInput:
    n = input("输入一个正整数\n")
    if not(n.isdigit()):
        continue
    if (n := int(n)) > 0:
        incorrectInput = False

lastFobonacci = 0
fobonacci = 1
for i in range(n):
    print(fobonacci, end=' ')
    lastFobonacci, fobonacci = fobonacci, lastFobonacci + fobonacci

print("")
input("Press any key to continue")
